//
//  CommentHeadView.m
//  TerritoryShopkeeper
//
//  Created by xiaowu on 2017/12/14.
//  Copyright © 2017年 ZDQK. All rights reserved.
//

#import "CommentHeadView.h"

@implementation CommentHeadView

- (instancetype)init {
    self = [super init];
    if (self) {
        [self configureUI];
    }
    return self;
}

//- (instancetype)initWithFrame:(CGRect)frame {
//    self = [super initWithFrame:frame];
//    if (self) {
//        [self configureUI];
//    }
//    return self;
//}

- (void)configureUI {
    self.view = [[[NSBundle mainBundle] loadNibNamed:@"CommentHeadView" owner:self options:nil] firstObject];
    self.view.frame = self.bounds;
    [self addSubview:self.view];
    
    self.titleLabel.font = TextPingFangFontSize(16);
    self.titleLabel.textColor = [UIColor blackTextColor];
    
    self.percentLabel.font = TextPingFangFontSize(14);
    self.percentLabel.textColor = [UIColor redF2color];
    
    self.percentTitleLabel.font = TextPingFangFontSize(14);
    self.percentTitleLabel.textColor = [UIColor gray66Color];
    
}

- (void)setCommentHeadViewForTitle:(NSString *)title percent:(NSString *)percent percentTitle:(NSString *)percentTitle {
    self.titleLabel.text = title;
    self.percentTitleLabel.text = percentTitle;
    self.percentLabel.text = percent;
}

@end
